/*
 * @Author: 生俊甫 1758142861@qq.com
 * @Date: 2024-10-07 17:02:58
 * @LastEditors: 生俊甫 1758142861@qq.com
 * @LastEditTime: 2024-10-07 17:10:41
 * @FilePath: /sjf/2024-project/2024_centos/test_to_c/stack_and_queue/stack_test.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h>

typedef int STDataType;

typedef struct stack
{
    STDataType* _a;
    int _top;
    int _capacity;
}stack;

void stack_init(stack* s);
void stack_destory(stack* s);
void push(stack* s,STDataType x);
void pop(stack* s);
int stack_top(stack* s);
bool stack_empty(stack* s);
int stack_size(stack* s);